package com.java.main.domain.user;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.java.main.domain.SysEntity.SysEntityAuto;
import org.hibernate.validator.constraints.NotBlank;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 
 * 
 * @Description:用户信息表
 * 
 * @author:WangYueQiang
 *
 * @time:2017年3月16日 上午11:56:13
 */
@ApiModel
@Entity
@Table(name = "user")
public class UserDO extends SysEntityAuto implements Serializable {
	private static final long serialVersionUID = 1L;
	public static final int superUserCategory = 0;
	/** 登录手机号 */
	@ApiModelProperty("登录手机号")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "mobile")
	@Column(nullable = true, length = 20)
	private String mobile;

	/** 用户名 */
	@ApiModelProperty("登录用户名")
	@NotBlank
	@Column(nullable = false, length = 100)
	private String userAccount;

	/** 用户密码 */
	@ApiModelProperty("用户密码")
	@Column(nullable = false, length = 32)
	private String password;

	public String getUserAccount() {
		return userAccount;
	}

	/** 用户类型 */
	@ApiModelProperty("用户类型 0系统管理员; 1普通用户 ")
	@Column(nullable = true, length = 1)
	private Integer categoryId;

	public void setUserAccount(String userAccount) {
		this.userAccount = userAccount;
	}

	/** 头像filekey */
	@ApiModelProperty("头像filekey")
	@Column(length = 100)

	private String img;

	/** 用户姓名 */
	@ApiModelProperty("用户姓名")
	@Column(nullable = true, length = 20)
	private String name;

	/** 性别 */
	@ApiModelProperty("性别 ")
	@Column(nullable = true, length = 1)
	private Integer sex;

	/** 入职日期 */
	@ApiModelProperty("入职日期  ")
	@Column(nullable = true)
	private Date gmt_entry;
	@Transient
	@ApiModelProperty("头像URL ")
	private String imgURL;
	/** 备注 */
	@ApiModelProperty("备注  ")
	@Column(length = 200)
	private String memo;
	/** 上下线状态 -针对技师预约*/
	@ApiModelProperty("上下线状态 ,默认上线状态")
	@Column(length = 10)
	private Integer state;
	@Transient
	@ApiModelProperty("入职信息 ")
	private List<UserEntryDO> entrys = new ArrayList<>();

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Integer getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(Integer categoryId) {
		this.categoryId = categoryId;
	}

	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	public Date getGmt_entry() {
		return gmt_entry;
	}

	public void setGmt_entry(Date gmt_entry) {
		this.gmt_entry = gmt_entry;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}



	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public List<UserEntryDO> getEntrys() {
		return entrys;
	}

	public void setEntrys(List<UserEntryDO> entrys) {
		this.entrys = entrys;
	}

	public String getImgURL() {
		return imgURL;
	}

	public void setImgURL(String imgURL) {
		this.imgURL = imgURL;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

}
